home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / trap13.arc / TRAP13.DOC < prev   
Text File  |  1988-04-09  |  2KB  |  60 lines

  1.  
  2. TRAP13 - Eric Pederson
  3.  
  4. TRAP13 is useful for both sides of the int13 copy breaking school.
  5.  
  6. The debug-trackers will find it useful because it gives the location the
  7.   interrupt is made from.  Actually, you just subtract one from the
  8.   offset given from TRAP13, and then (U)nassemble using debug.
  9.  
  10. The other side, the result-fakers, will more readily appreciate the
  11.   TRAP13 output.  I have chosen to give calling and return arguments
  12.   in register style, rather than symbolically.  At least one int13
  13.   trap program I know makes the error of not completely symbolizing its
  14.   results.  If the user must look up the meaning of a function passed,
  15.   he might as well have for reference all the register args.  I also
  16.   chose to include the status of the carry flag.
  17.  
  18. For reference:
  19.  
  20. Int 13h
  21.  
  22. Input:
  23.  
  24. AH : function
  25.        (discussing only function 02, read diskette sectors)
  26.  
  27. AL : number of sectors
  28. CH : track no.
  29. CL : sector no.
  30. DH : head no.
  31. DL : drive no.
  32. ES:BX : pointer to buffer
  33.  
  34. Output:
  35.  
  36. CF : error flag
  37. AH : return code
  38. AL : no. of sectors read
  39.  
  40. Suggestions:
  41.  
  42. I would always suggest making two runs of trap13, one with a bona-fide
  43.  disk, and another with a bogus disk.  This way you can see what
  44.  the program is looking for, and then fake it easier.
  45.  
  46. If you write any fake/fix programs, i would suggest using the same sig
  47.   as trap13's.  SSFIX is an example.  The reason is because you only
  48.   want one non-BIOS routine linked to that vector at a time.  If you
  49.   have more, it really defeats the purpose.  without the same signiature,
  50.   you might have the TRAP program call your FIX program, and things get
  51.   to be a big mess. So, try to use a standard signiature.
  52.  
  53. Also, to re-install a FIX program for testing, use the ROM13 program to
  54.   reset the vector to the BIOS.  The old program will still be in
  55.   memory, but unused.  ROM13 is handy for debugging, as it avoids
  56.   alt-ctrl-del'ing a lot.
  57.  
  58. Note:  TRAP13 will work with the printer off in most cases.  So the
  59.   printer being off will not hang the system.
  60.